class ApplicationBase:
    def common_button(self, button_name):
        return "//button[text()='" + button_name + "']"

    def label_input(self, lable_name):
        return "//label[text()='" + lable_name + "']/following-sibling::input"

    def combobox(self, lable_name):
        return "//label[text()='" + lable_name + "']/following-sibling::div"

    def combobox_detail(self, item):
        return "//div[text()='" + item + "']"

    def active_button(self, button_name):
        return "//div[contains(@class,'active')]//button[text()='" + button_name + "']"

    def file_input(self, suffix, multiple=False):
        input_xpath = "//input[@type='file' and contains(@accept,'" + suffix + "')]"
        if multiple:
            input_xpath = input_xpath[:-1] + " and @multiple]"
        return input_xpath

    def published_app(self, app_name):
        return "//h2[text()='Published Application']/parent::div/following-sibling::div//div[text()='" + app_name + "' and not(@role='tooltip')]"
